Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REF] Replace deprecated function call with a more readable alternative #15489

Merged
merged 1 commit into from
Oct 13, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

This adds a wrapper to getting financial accounts with the type & uses it rather than the non-deprecated function

Before

Deprecated function called

After

More readable function called

Technical Details

@monishdeb I'd like to advocate for functions like this for getting the financial accounts. They are a pretty thin wrapper on getFinancialAccountForFinancialTypeByRelationship but I feel it's more readable & less error prone (no need to get 'Sales Account Is' exactly right, instead use IDE autocomplete)

Comments

This adds a wrapper to getting financial accounts with the type. We could call the other directly but it's less
readable & requires the account name to be specified which feels like a look-up for devs
@civibot
Copy link

civibot bot commented Oct 11, 2019

(Standard links)

@civibot civibot bot added the master label Oct 11, 2019
@eileenmcnaughton
Copy link
Contributor Author

test this please

@mattwire mattwire merged commit 620bacc into civicrm:master Oct 13, 2019
@eileenmcnaughton eileenmcnaughton deleted the credit_dep branch October 13, 2019 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants